package com.example.demo.controller;

import com.example.demo.entity.OrderDto;
import com.example.demo.service.OrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiYuhang
 * @version 0.1
 * @application 自定义注解实现策略模式
 * @Copyright 上海危网信息科技有限公司版权所有
 * @company wwsoft
 * @Date 2020/4/21 11:12
 */
@RestController
public class TestController2 {
    private static final Logger log = LoggerFactory.getLogger(TestController2.class);
    @Autowired
    private OrderService orderService;

    @RequestMapping("test2")
    public void test2(OrderDto dto) {
        String returnStr = orderService.handle(dto);
        log.info(returnStr);
    }
    @RequestMapping("test3")
    public void test3() {
        String returnStr =null;
        System.out.println(returnStr.toString());
    }
}
